package top.lt.lt_ssm.controller;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import top.lt.lt_ssm.bean.finance;
import top.lt.lt_ssm.service.financeService;
import top.lt.lt_ssm.util.SimpleResult;

@Controller
@RequestMapping("/finance")
public class FinanceController {
	@Resource
	private financeService financeService;

	@RequestMapping("/list")
	public String financeList() {
		return "finance/finance_list";
	}

	@RequestMapping("/financeGetAll")
	public @ResponseBody SimpleResult getall() {
		return new SimpleResult(financeService.getAllFinance());
	}
	
	@RequestMapping("/Getin1/{in1}")
	public @ResponseBody SimpleResult Getin1(@PathVariable("in1") int pc) {
		List<finance> dx = financeService.Dx(pc);
		return new SimpleResult(dx);
	}
	@RequestMapping("/Getin2/{in2}")
	public @ResponseBody SimpleResult Getin2(@PathVariable("in2") String un) {
		List<finance> mh = financeService.Mh(un);
		return new SimpleResult(mh);
	}
}
